package com.wenhai.spring.aop.features;

import com.wenhai.spring.aop.features.service.EchoService;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * AspectJ 演示
 *
 * @author wenhai
 * @date   2021/3/4
 */
@Configuration
@EnableAspectJAutoProxy
public class AspectJSchemaBasedPointcutDemo {
    public static void main(String[] args) {
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("classpath:/META-INF/spring-aop-context.xml");
        System.out.println(ctx.getBean("echoService", EchoService.class).echo("Hello,World"));
        ctx.close();
    }



}
